package com.cloudbroker.bcs.platform.dav.bizapi.constants.status;

public enum ClientOpenAccountsStatus {
    
    REGISTERED(0, "开户中"),
    
    APPLICATION(2, "审核中"),
    
    COMPLETE(3, "开户成功"),
    
    ;

    
    private final int val;
    
    private final String description;
    
    private String toString;
    
    private ClientOpenAccountsStatus(int val, String description) {
        this.val = val;
        this.description = description;
    }
    
    public int getVal() {
        return val;
    }
    
    public String getDescription() {
        return description;
    }
    
    public static String getDescription(int val) {
        for (ClientOpenAccountsStatus s : ClientOpenAccountsStatus.values()) {
            if (s.getVal() == val) {
                return s.getDescription();
            }
        }
        return "";
    }
    
    @Override
    public String toString() {
        if (null == toString) {
            toString = new StringBuilder().append("ClientMsgStatus[").append(val).append(':').append(description)
                    .append(']').toString();
        }
        return toString;
    }
    
}
